package org.car.world.wx.api.MediaPlayer.service;

public class MediaAdapter  implements MediaPlayer{

	AdvancedMediaPlayer    AdvancedMedia;
	
	public MediaAdapter(String totype)
	{
		
		if(totype.equalsIgnoreCase("vlc")){
			AdvancedMedia = new VlcPlayer();
		}else if(totype.equalsIgnoreCase("mp4")){
			AdvancedMedia = new Mp4Player();
		}
		
		
	}
	
	@Override
	public void play(String audioType, String fileName) {
		if(audioType.equalsIgnoreCase("vlc")){
			AdvancedMedia = new VlcPlayer();
		}else if(audioType.equalsIgnoreCase("mp4")){
			AdvancedMedia = new Mp4Player();
		}
		
	}

}
